<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>   
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!doctype html>
<html  lang="zh-CN">
<head>
<meta charset="utf-8">
<title>p2p网贷平台排名-p2p投资理财公司排名-p2p贷款平台</title>
<meta name="keywords" content="p2p网贷平台" />
<meta name="description" content="未来网贷提供p2p网贷平台排名、理财公司排名,为您提供最具参考价值的P2P网贷平台数据" />
<link rel="shortcut icon" type="/image/x-icon" href="${basePath }/${basePath }/images/favicon.ico" />
<link rel="stylesheet" href="${basePath }/css/public.css"/>
<link rel="stylesheet" href="${basePath }/css/platform_list.css"/>
<link rel="stylesheet" href="${basePath }/css/index_rightfloat.css" />
<link rel="stylesheet" href="${basePath }/css/circlejindu.css"/>
<script src="${basePath }/js/jquery-1.8.2.min.js"></script>
<link rel="stylesheet" href="${basePath }/js/index_rightfloat.js" />
</head>
<body>

<div id="page-top">
	<jsp:include page="/include/top.jsp"/>
</div>
<!--头部结束-->
<!--banner广告-->
<div class="ad"><a href="javascript:;"><img src="${basePath }/images/ad.png" ></a></div>
<!--头部结束-->

<!--正文开始-->
<div id="section">
    <div class="frame">
        <div class="frame-left">
            <div id="smart-bar">
                <div class="path-info">
                    <a>首页</a> > <a>产品</a> > <a class="current-page">列表</a>
                </div>
                <div class="selector-list">
                    <ul class="selector-set">
                    </ul>
                </div>

                <div class="mini-search">
                    <form>
                        <input type="text" placeholder="请输入平台简拼或关键字"/>
                    </form>
                </div>
            </div>

            <div class="select-condition clear-fix">
            <form id="platform_select_form" action="">
                <div class="select-condition-list clear-fix">
                    <font>热门标签</font>
                    <ul class="select-list btn" id="hot-tag">
                        <li><a href="javascript:;">排名高收益稳定</a></li>
                        <li><a href="javascript:;">有风头更安心</a></li>
                        <li><a href="javascript:;">老牌平台</a></li>
                        <li><a href="javascript:;">新锐平台</a></li>
                    </ul>
                </div>

                <div class="select-condition-list clear-fix">
                    <font>安全评级:</font>
                    <ul class="select-list" id="grade">
                        <li><a href="javascript:;">不限</a></li>
                        <li><label for="grade1"><input type="checkbox" name="comprehensive_rating" id="grade1" value="6"/>AAA</label></li>
                        <li><label for="grade2"><input type="checkbox" name="comprehensive_rating" id="grade2" value="5"/>AA</label></li>
                        <li><label for="grade3"><input type="checkbox" name="comprehensive_rating" id="grade3" value="4"/>A</label></li>
                        <li><label for="grade4"><input type="checkbox" name="comprehensive_rating" id="grade4" value="3"/>BBB</label></li>
                        <li><label for="grade5"><input type="checkbox" name="comprehensive_rating" id="grade5" value="2"/>BB</label></li>
                        <li><label for="grade6"><input type="checkbox" name="comprehensive_rating" id="grade6" value="1"/>B</label></li>
                    </ul>
                </div>

                <div class="select-condition-list clear-fix">
                    <font>年化收益:</font>
                    <ul class="select-list" id="income">
                        <li><a href="javascript:;">不限</a></li>
                        <li><label for="incame1"><input type="checkbox" name="average_interest_rate" id="incame1" value="0-8"/>8%以下</label></li>
                        <li><label for="incame2"><input type="checkbox" name="average_interest_rate" id="incame2" value="8-12"/>8-12%</label></li>
                        <li><label for="incame3"><input type="checkbox" name="average_interest_rate" id="incame3" value="12-14"/>12-14%</label></li>
                        <li><label for="incame4"><input type="checkbox" name="average_interest_rate" id="incame4" value="14-16"/>14-16%</label></li>
                        <li><label for="incame5"><input type="checkbox" name="average_interest_rate" id="incame5" value="16-"/>16%以下</label></li>
                    </ul>
                </div>

                <div class="select-condition-list clear-fix">
                    <font>投资期限:</font>
                    <ul class="select-list" id="dateline">
                        <li><a href="javascript:;">不限</a></li>
                        <li><label for="dateline1"><input type="checkbox" name="average_investment_horizon" id="dateline1" value="0-1"/>1月以下</label></li>
                        <li><label for="dateline2"><input type="checkbox" name="average_investment_horizon" id="dateline2" value="1-3"/>1-3个月</label></li>
                        <li><label for="dateline3"><input type="checkbox" name="average_investment_horizon" id="dateline3" value="3-6"/>3-6个月</label></li>
                        <li><label for="dateline4"><input type="checkbox" name="average_investment_horizon" id="dateline4" value="6-12"/>6-12个月</label></li>
                        <li><label for="dateline5" class="select-label-big"><input type="checkbox" name="average_investment_horizon" id="dateline5" value="12-"/>12个月以上</label></li>
                    </ul>
                </div>
                
                <div class="select-condition-list clear-fix">
                    <font>上线时间:</font>
                    <ul class="select-list" id="online_time">
                        <li><a href="javascript:;">不限</a></li>
                        <li><label for="dateline1"><input type="checkbox" name="online_time" id="online_time1" value="2015-"/>2015年</label></li>
                        <li><label for="dateline2"><input type="checkbox" name="online_time" id="online_time2" value="2014-2015"/>2014年</label></li>
                        <li><label for="dateline3"><input type="checkbox" name="online_time" id="online_time3" value="2013-2014"/>2013年</label></li>
                        <li><label for="dateline4"><input type="checkbox" name="online_time" id="online_time4" value="2012-2013"/>2012年</label></li>
                        <li><label for="dateline4"><input type="checkbox" name="online_time" id="online_time5" value="2011-2012"/>2011年</label></li>
                        <li><label for="dateline5" class="select-label-big"><input type="checkbox" name="online_time" id="online_time6" value="-2011"/>2011年以前</label></li>
                    </ul>
                </div>

                <div class="select-condition-list clear-fix">
                    <font>所在地区:</font>
                    <ul class="select-list">
                        <li><a href="javascript:;">不限</a></li>
                    </ul>
                    <ul class="select-list limit-section" id="area">
                    	<c:forEach items="${area }" var="pro" varStatus="proStatus">
                    		<li><label for="area${proStatus.index+1} "><input type="checkbox" name="province_id" id="area${proStatus.index+1} " value="${pro.code }"/>${pro.desc }</label></li>
                    	</c:forEach>
                    </ul>
                </div>

                <div class="select-condition-list clear-fix" style="display: none">
                    <font>注册资金:</font>
                    <ul class="select-list" id="regfund">
                        <li><a href="javascript:;">不限</a></li>
                        <li><label for="regfund1"><input type="checkbox" name="regfund" id="regfund1" value="0-500"/>小于<i>500</i>万</label></li>
                        <li><label for="regfund2" class="select-label-big"><input type="checkbox" name="registered_capital" id="regfund2" value="500-1000"/><i>500-1000</i>万</label></li>
                        <li><label for="regfund3" class="select-label-big"><input type="checkbox" name="registered_capital" id="regfund3" value="1000-3000"/><i>1000-3000</i>万</label></li>
                        <li><label for="regfund4" class="select-label-big"><input type="checkbox" name="registered_capital" id="regfund4" value="3000-"/><i>3000</i>万以上</label></li>
                    </ul>
                </div>

                <div class="select-condition-list clear-fix" style="display: none">
                    <font>保障模式:</font>
                    <ul class="select-list" id="safeguard">
                        <li><a href="javascript:;">不限</a></li>
                        <li><label for="safeguard1" class="select-label-big"><input type="checkbox" name="security_model" id="safeguard1" value="风险准备金"/>风险准备金</label></li>
                        <li><label for="safeguard2"><input type="checkbox" name="security_model" id="safeguard2" value="小贷公司"/>小贷公司</label></li>
                        <li><label for="safeguard3" class="select-label-max"><input type="checkbox" name="security_model" id="safeguard3" value="担保公司"/>担保公司</label></li>
                        <li><label for="safeguard5"><input type="checkbox" name="security_model" id="safeguard4" value="平台垫付"/>平台垫付</label></li>
                        <li><label for="safeguard6" class="select-label-min"><input type="checkbox" name="security_model" id="safeguard5" value="其他"/>其他</label></li>
                    </ul>
                </div>

                <div class="select-condition-list clear-fix" style="display: none">
                    <font>资金托管:</font>
                    <ul class="select-list" id="custodial">
                        <li><a href="javascript:;">不限</a></li>
                        <li><label for="custodial" class="select-label-max"><input type="checkbox" name="escrow" id="custodial1" value="1"/>用户资金托管</label></li>
                        <li><label for="custodial" class="select-label-max"><input type="checkbox" name="escrow" id="custodial2" value="2"/>风险准备金托管</label></li>
                        <li><label for="custodial"><input type="checkbox" name="escrow" id="custodial3" value="3"/>无托管</label></li>
                    </ul>
                </div>

                <div class="select-condition-list clear-fix" style="display: none">
                    <font>债权转让:</font>
                    <ul class="select-list" id="transfer">
                        <li><a href="javascript:;">不限</a></li>
                        <li><label for="transfer1"><input type="checkbox" name="creditor_rights_transfer" id="transfer1" value="1"/>可转让</label></li>
                        <li><label for="transfer2"><input type="checkbox" name="creditor_rights_transfer" id="transfer2" value="2"/>不可转让</label></li>
                    </ul>
                </div>

                <div class="select-condition-list clear-fix" style="display: none">
                    <font>平台背景:</font>
                    <ul class="select-list" id="platback">
                        <li><a href="javascript:;">不限</a></li>
                        <li><label for="platback1"><input type="checkbox" name="platform_background" id="platback1" value="1"/>银行系</label></li>
                        <li><label for="platback2"><input type="checkbox" name="platform_background" id="platback2" value="2"/>民营系</label></li>
                        <li><label for="platback3" class="select-label-big"><input type="checkbox" name="platform_background" id="platback3" value="3"/>上市公司系</label></li>
                        <li><label for="platback4"><input type="checkbox" name="platform_background" id="platback4" value="4"/>国资系</label></li>
                    </ul>
                </div>

                <div class="select-condition-list clear-fix" style="display: none">
                    <font>平台特征:</font>
                    <ul class="select-list" id="feature">
                        <li><a href="javascript:;">不限</a></li>
                        <li><label for="feature1" class="select-label-big" ><input type="checkbox" name="platform_features" id="feature1" value="加入过风投"/>加入过风投</label></li>
                        <li><label for="feature2"><input type="checkbox" name="platform_features" id="feature2" value="加入协会"/>加入协会</label></li>
                        <li><label for="feature3" class="select-label-max"><input type="checkbox" name="platform_features" id="feature3" value="加入第三方征信"/>加入第三方征信</label></li>
                        <li><label for="feature4"><input type="checkbox" name="platform_features" id="feature4" value="问题平台"/>问题平台</label></li>
                    </ul>
                </div>
			</form>
           </div>

            <div class="folder">
                <div class="folder-btn">
                    <a href="javascript:;" class="down">展开</a>
                </div>
            </div>

            <div class="platform-list-title clear-fix">
                <h2 id="size">为您找到78个网贷平台</h2>
                <div class="drop-input drop-down"><span>默认排序</span>
                    <div class="order-selector">
                        <a href="javascript:;">默认排序</a>
                        <a href="javascript:;">安全评级</a>
                        <a href="javascript:;">年化收益</a>
                        <a href="javascript:;">注册资金</a>
                    </div>
                </div>
            </div>

            <div id="platform_list" class="platform-list clear-fix">
            </div>

            <div class="more-plat">
                <a  href="javascript:getpage();">加载更多</a>
            </div>
        </div>
        <div class="frame-right">
            <h1 class="right-title">平台入口</h1>
            <div class="frame-right-box">
                <div class="login-box">
                    <dl><dt><a href="javascript:;" target="_blank"><img src="${basePath }/images/icon_head.png"></a></dt><dd>Hi,下午好<br>欢迎来到 <strong>weilaiwd.com</strong></dd></dl>
                    <ul>
                        <li><a href="javascript:;" target="_blank" class="loginbtn">登录</a></li>
                        <li><a href="javascript:;" target="_blank" class="regbtn">立即注册</a></li>
                    </ul>
                </div>
                <div class="right-flow">
                    <a href="javascript:;" class="flow-1">注册<i></i></a>
                    <a href="javascript:;" class="flow-2">认证<i></i></a>
                    <a href="javascript:;" class="flow-3">发布</a>
                </div>
                <div class="right-button">
                    <div class="clear-fix">
                        <a href="javascript:;" class="btn-1">平台入驻</a>
                        <a href="javascript:;" class="btn-2">数据对接</a>
                        <a href="javascript:;" class="btn-3">入驻流程</a>
                        <a href="javascript:;" class="btn-4">对接流程</a>
                    </div>
                </div>
            </div>

            <div class="platform-ad">
                <img src="${basePath }/images/pt_ad.png" width="300"/>
            </div>

            <div class="nav-title"><a href="javascript:;" target="_blank">热门平台</a><span></span></div>
            <ul id="hot_platform_list" class="hot-platform">
                <li class="p-title"><span class="p-num">&nbsp;</span><span class="p-name">平台名称</span><span class="p-rate-t">年化利率</span></li>
                <li><span class="p-num"><i>1</i></span><span class="p-name"><a href="javascript:;">银豆网</a></span><span class="p-rate">1%</span></li>
                <li><span class="p-num"><i>2</i></span><span class="p-name"><a href="javascript:;">金信网</a></span><span class="p-rate">2%</span></li>
                <li><span class="p-num"><i>3</i></span><span class="p-name"><a href="javascript:;">众信在线</a></span><span class="p-rate">12%</span></li>
                <li><span class="p-num">4</span><span class="p-name"><a href="javascript:;">陆金所</a></span><span class="p-rate">0%</span></li>
                <li><span class="p-num">5</span><span class="p-name"><a href="javascript:;">人人贷</a></span><span class="p-rate">0%</span></li>
                <li><span class="p-num">6</span><span class="p-name"><a href="javascript:;">陆金所</a></span><span class="p-rate">100%</span></li>
                <li><span class="p-num">7</span><span class="p-name"><a href="javascript:;">陆金所</a></span><span class="p-rate">11%</span></li>
                <li><span class="p-num">8</span><span class="p-name"><a href="javascript:;">陆金所</a></span><span class="p-rate">22%</span></li>
                <li><span class="p-num">9</span><span class="p-name"><a href="javascript:;">陆金所</a></span><span class="p-rate">32%</span></li>
                <li><span class="p-num">10</span><span class="p-name"><a href="javascript:;">陆金所</a></span><span class="p-rate">71%</span></li>
            </ul>
        </div>
    </div>
</div>
<!--正文结束-->
<jsp:include page="/include/footer.jsp"/>
<!-- 右侧浮动代码开始 -->

<!--弹出跳转框开始-->
<div id="platform-jump">
    <h1>登陆未来网贷账号<a class="close" href="javascript:;">×</a></h1>
    <div class="info">
        <p>一站式的金融服务</p>
        <p>最有价值的金融平台！</p>
    </div>
    <div class="btn">
        <a href="javascript:;" class="l">立即登陆</a><a href="javascript:;" class="r">直接去平台</a>
    </div>
</div>
<!--弹出跳转框结束-->
<script>
$(function(){
	getpage();
})
$("#hot_platform_list").append("${basePath}/productList/hot");

    var small_height = -10;
    var big_height = 7;
    $(".select-condition-list").each(function(i){

        big_height += $(this).outerHeight(true);
        if(i<5){
            small_height += $(this).outerHeight(true);
        }
        if(i == 10){
            $(".select-condition").css({"overflow":"hidden","height":small_height})
            $(".select-condition-list").show();

        }
        console.log(i,$(this).outerHeight(true),big_height,small_height);
    })

    $(".folder-btn a").click(function(){
        var that = this;
        if($(this).hasClass('down')){
            $(this).removeClass('down').addClass('up')
            $(".select-condition").animate({"height":big_height},1000,function(){
                $(that).html("收起")
            })
        }else{
            $(this).removeClass('up').addClass('down')
            $(".select-condition").animate({"height":small_height},1000,function(){
                $(that).html("展开")
            })
        }
        return false;
    })

    var tpl = '<li id="_id_replace_"><span class="selector-info">_txt_replace_</span><span class="close-x"></span></li>';

    function multi_select(item){
        var container = $(item).closest(".select-condition-list");
        if(container.length){
            var node,text;
            if($(item).closest("li").find("input[type=checkbox]").length){/*勾选*/
                node = $(item).closest("li").find("label");
                var fid = $(item).closest(".select-list").attr('id');
                var index = $(item).closest(".select-list").find("label").index(node);
                var newid = fid +"_"+index;
                // console.log(node);
                if(!node.hasClass('box-checked')){
                    var txt = node.text();
                    node.find("input[type=checkbox]").attr("checked","checked");
                    if(!$("#"+newid).length){
                        var nodeinfo =  tpl.replace("_id_replace_",newid).replace("_txt_replace_",txt);
                        $(".selector-set").append(nodeinfo);
                    }
                    $(container).find("a.box-checked").removeClass('box-checked');
                }else{
                    if($("#"+newid).length){
                        $("#"+newid).remove();
                    }
                }
            }else{/*点击不限*/
                node = $(item).closest("li").find("a");
                if(!node.hasClass('box-checked')){
                    $(container).find(".box-checked").find("input[type=checkbox]").removeAttr("checked");
                    $(container).find(".box-checked").removeClass('box-checked');
                    $(container).find(".select-list").each(function(){
                        if(typeof($(this).attr('id'))!="undefined"){
                            var fid = $(this).attr('id');
                            $(".selector-set li[id^='"+fid+"']").remove();
                        }
                    });
                }
            }
            if(node.hasClass('box-checked')){
                node.removeClass("box-checked");
                node.find("input").removeAttr("checked");
            }else{
                node.addClass('box-checked');
            }
        }
    }
    /*绑定多选事件*/
    $(".select-condition-list a").click(function(){
    	getData();
    	if(!$(this).closest('.select-list').hasClass('btn')){
            multi_select(this);
            return false;
        }else{
            if($(this).hasClass('cur')){
                $(this).removeClass('cur')
            }else{
                $(this).addClass('cur')
            }
            return false;
        }
        
    })
    $(".select-condition-list label").click(function(){
        multi_select(this);
        getData();
        return false;
    })
    /*取消选择*/
    $(".selector-set").on("click","li",function(){
        var idstr = $(this).attr('id');
        if(idstr){
            var fid = idstr.split("_")[0];
            var index = idstr.split("_")[1];
            var node = $("#"+fid+" label").eq(index);
            if(node.length){
                node.find("input[type=checkbox]").removeAttr("checked");
                node.removeClass("box-checked");
                $(this).remove();
                var pos_type = $("#smart-bar").css('position');
                if(pos_type !='static'){
                    console.log(pos_type)
                    var list_top = $(".platform-list-title").offset().top;
                    var height = $("#smart-bar").height();
                    $("body").animate({"scrollTop":list_top - height - 5});
                }
            }
        }
    })

    /*下拉框*/
    $(".drop-input").click(function(){
        if($(".order-selector").is(":hidden")){
            $(this).removeClass('drop-down').addClass('drop-up');
            $(".order-selector").show();
        }else{
            $(this).removeClass('drop-up').addClass('drop-down');
            $(".order-selector").hide();
        }
        return false;
    })
    $(".order-selector a").click(function(){
        $(".drop-input span").html($(this).text());
    })

    /*进入平台弹出框*/
    $(".platform-list").on("click",".enter-homepage",function(){
        var top = ($(window).height() -  $("#platform-jump").height())/2;
        var left = ($(window).width() -  $("#platform-jump").width())/2;
        var scrollTop = $(document).scrollTop();
        var scrollLeft = $(document).scrollLeft();
        $("#platform-jump").show().offset({"left":left+scrollLeft,"top":top+scrollTop});
        return false;
    })
    $("#platform-jump a").click(function(){
        $("#platform-jump").hide();
    })

    var follow = function(){};
    follow.prototype = {
        init : function(id){
            this.obj = $("#"+id);
            this.org_top = this.obj.offset().top;
            this.org_lef = this.obj.offset().left;
            this.org_height = this.obj.height();
            this.has_move = 0;
            this.offset = 0;
            this.interval = null;
            this.scrolltop = $(window).scrollTop();
        },

        _move :function(that){

            var scrolltop = $(window).scrollTop();
            var onmove = that.obj.is(":animated");
            if(scrolltop - that.org_top> that.org_height && (!that.has_move) && !onmove){
                this.obj.css({"position":"fixed","left":that.org_lef,"top":0,"padding-top":5})
            }
            if(scrolltop - that.org_top <=0){
                that.obj.css({"position":"static","padding-top":0});
                that.has_move = 0;
            }
        },

        start : function(){
            var that = this;
            $(window).scroll(function(){
                that.scrolltop = $(window).scrollTop();
                if(that.scrolltop - that.org_top <=0){
                    that.obj.css({"position":"static","padding-top":0});
                    return;
                }
                that._move(that);
            })
        }
    };

    var follow_smart_bar = new follow();
    follow_smart_bar.init('smart-bar');
    follow_smart_bar.start();
</script>

<script type="text/javascript">
function getData(){
	var param = "";
    $("#platform_select_form").find("input[type=checkbox][checked] ").each(function(){
    	param  = param +"&"+ $(this).attr("name")+"="+$(this).attr("value");
    });
    alert(param);
	$.ajax({
	     type: 'get',
	     url: "${basePath }/platformnew/platform_list_detail?pageNo="+$("#platform_list").find(".pageNumber").last().val() ,
	    data: param ,
	    dataType: "html",
	    success: function(data){
	    	
	    	$("#platform_list").html(data);
	    } 
	    
	});
	
}

function getpage(){
	alert(1);
	var param = "";
	var pageNo = 1;
	if($("#platform_list").find(".pageNumber").last().val()){
		pageNo = parseInt($("#platform_list").find(".pageNumber").last().val())+1;
	}else{
		pageNo = 1;
	}
    $("#platform_select_form").find("input[type=checkbox][checked] ").each(function(){
    	param  = param +"&"+ $(this).attr("name")+"="+$(this).attr("value");
    });
    alert(param);
	$.ajax({
	     type: 'get',
	     url: "${basePath }/platformnew/platform_list_detail?pageNo="+pageNo ,
	    data: param ,
	    dataType: "html",
	    success: function(data){
	    	
	    	$("#platform_list").append(data);
	    } 
	    
	});
	
}



</script>
</body>
</html>